package com.hzh.MLlib

import org.apache.spark.ml.linalg
import org.apache.spark.ml.linalg.Vectors

object Demo1Type {
  def main(args: Array[String]): Unit = {
    val vector: linalg.Vector = Vectors.dense(Array(1.0, 0, 2.2, 3.4, 0, 0, 0, 0, 5.4, 1.4, 5.4, 0, 0, 0, 0))

    println(vector)

    println(vector.toSparse)
  }
}
